<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "student".
 *
 * @property int $id
 * @property int $classid 班级id
 * @property int $sid 学生id
 */
class Student extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'student';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['classid', 'sid','name','email'], 'required'],
            [['classid', 'sid'], 'integer'],
            [['name'],'string','max'=>30],
            [['email'],'string','max'=>255],

        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'classid' => 'Classid',
            'sid' => 'Sid',
            'name'=>'Name',
            'email'=>'email',
        ];
    }
}
